Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add blockReadConcurrency option to exporter #361

Merged
merged 5 commits into from
Jan 19, 2024

Conversation

achingbrain
Copy link
Member

By default we attempt to load all sibilings in a given layer of a DAG at once to allow slow/async loading routines extra time to fetch data before it is needed.

Some blockstores (e.g. CAR files) require the exporter to only request the next sequential CID in a DAG.

Add a blockReadConcurrency option (named similarly to the importer's blockWriteConcurrency option) to control this behaviour.

Fixes #359

By default we attempt to load all sibilings in a given layer of a
DAG at once to allow slow/async loading routines extra time to fetch
data before it is needed.

Some blockstores (e.g. CAR files) require the exporter to only request
the next sequential CID in a DAG.

Add a `blockReadConcurrency` option (named similarly to the importer's
`blockWriteConcurrency` option) to control this behaviour.

Fixes #359
@achingbrain
Copy link
Member Author

cc @guanzo

Copy link
Member

@SgtPooki SgtPooki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, but I think we can provide more guidance around the final result of setting the values of the new config option. suggested edit provided.

packages/ipfs-unixfs-exporter/src/index.ts Outdated Show resolved Hide resolved
@guanzo
Copy link

guanzo commented Sep 21, 2023

Does the concurrency option also need to be set in these 2 places?


@achingbrain
Copy link
Member Author

@guanzo yes, good spot - this has been updated and tests for this added.

@achingbrain achingbrain merged commit 295077e into master Jan 19, 2024
19 checks passed
@achingbrain achingbrain deleted the feat/add-block-read-concurrency-exporter-option branch January 19, 2024 09:04
github-actions bot pushed a commit that referenced this pull request Jan 19, 2024
## ipfs-unixfs-exporter [13.4.0](ipfs-unixfs-exporter-13.3.1...ipfs-unixfs-exporter-13.4.0) (2024-01-19)

### Features

* add blockReadConcurrency option to exporter ([#361](#361)) ([295077e](295077e)), closes [#359](#359)
Copy link

🎉 This PR is included in version 13.4.0 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Copy link

github-actions bot commented Apr 5, 2024

🎉 This PR is included in version 11.1.4 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strict DFS traversal
4 participants